<?php
/**
 * Created by wangzhe.
 * Time: 2021/4/15 22:00
 */

namespace App\Http\Validate\Api\Role;

use App\Http\Validate\BaseValidate;

/**
 * Class AlarmRuleV
 * @package App\Http\Validate\Admin\Mutual
 *
 * @控制器中调用方式
 * $validate = AlarmRuleV::edit($params);
 *    if ($validate->fails()) {
 *    return $this->fail(MyMessage::PARAM_VALIDATE_FAILED, $validate->errors()->first());
 * }
 *
 */
class RoleRuleV extends BaseValidate
{
    public static function get($params)
    {
        self::$rules =  [
            'rule'           => [
            ],
            'custom_message' => [
                'title.required' => '规则名称不能为空',
                'title.unique'   => '规则名称已存在',
            ]
        ];

        return self::check($params);
    }
  public static function add($params)
  {
    self::$rules =  [
      'rule'           => [
      ],
      'custom_message' => [
        'title.required' => '不能为空',
        'title.unique'   => '已存在',
      ]
    ];

    return self::check($params);
  }
  public static function edit($params)
  {
    self::$rules =  [
      'rule'           => [
      ],
      'custom_message' => [
        'title.required' => '规则名称不能为空',
        'title.unique'   => '规则名称已存在',
      ]
    ];

    return self::check($params);
  }
  public static function del($params)
  {
    self::$rules =  [
      'rule'           => [
      ],
      'custom_message' => [
        'title.required' => '规则名称不能为空',
        'title.unique'   => '规则名称已存在',
      ]
    ];

    return self::check($params);
  }


}
